package com.caregiver.watch.business.user.model.dto;

import com.caregiver.watch.business.user.model.po.UserHealthGoal;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @description: 用户健康目标参数
 * @program: caregiver-watch
 * @author: 疆戟
 * @create: 2025-10-03 22:47
 */
@Data
@Schema(description = "用户健康目标参数")
public class UserHealthGoalParam {

    // 每日活动消耗
    @Schema(description = "每日活动消耗(卡路里/天)")
    private Integer dailyActivityConsumption;
    // 每日活动时长
    @Schema(description = "每日活动时长(分钟/天)")
    private Integer dailyActivityDuration;
    // 每日站立次数
    @Schema(description = "每日站立时长(分钟)")
    private Integer dailyStandingTime;
    // 每日步数
    @Schema(description = "每日步数")
    private Integer dailySteps;
    // 睡眠时长（小时）
    @Schema(description = "睡眠时长(小时)")
    private Integer sleepDurationHour;
    // 睡眠时长（分钟）
    @Schema(description = "睡眠时长(分钟)")
    private Integer sleepDurationMinute;



    public UserHealthGoal toPo(Long userId) {
        UserHealthGoal userHealthGoal = new UserHealthGoal();
        userHealthGoal.setUserId(userId);
        userHealthGoal.setDailyActivityConsumption(this.dailyActivityConsumption);
        userHealthGoal.setDailyActivityDuration(this.dailyActivityDuration);
        userHealthGoal.setDailyStandingTime(this.dailyStandingTime);
        userHealthGoal.setDailySteps(this.dailySteps);
        userHealthGoal.setSleepDurationHour(this.sleepDurationHour);
        userHealthGoal.setSleepDurationMinute(this.sleepDurationMinute);
        return userHealthGoal;
    }
}
